<template>
<div class="view-home">
	<span @click='clickFirst'>full</span>
	{{firstName}}:{{fullName}}
</div>
</template>

<script>
// @ is an alias to /src

export default {
	name: 'Home',
	components: {},
	data () {
		return {
			firstName: 'aa',
		};
	},
	methods: {
		clickFirst () {
			console.log(111);
			this.fullName = 'new name';
		},
	},
	computed: {
		fullName: {
			get: function () {
				console.log('调用了getter属性')
				return '***' + this.firstName + '***'
			},
			set: function (newValue) {
				console.log('调用了settter属性')
				console.log(newValue)
				this.firstName = newValue
			}
		},
	},
}
</script>
